The World Wide Web has expanded to provide web services faster to consumers. Web services may be provided by a web application which uses one or more services to handle a transaction. The applications may be distributed over several machines, making the topology of the machines that provides the service more difficult to track and monitor.
Application monitoring based on threads is relatively straightforward when one request is carried out by a single thread. Some web-based applications are based on frameworks that run on only one thread at a time—one thread processes many requests. These frameworks are more difficult to monitor and provide context for individual requests and transactions. Additionally, if the framework allows requests to operate asynchronously, a single threaded framework may not provide useful information when it is monitored. A single request called over and over may not be differentiated from other instances of the same request executed within the thread.
In such a system the application logic is decomposed into one or more functions. One or more of these function is registered with the framework such that when a request is received by the framework the framework will call one or more of the registered functions. An application using the framework may utilize services (such as other networked services, databases, caches etc) on the same computer or other computers. When an application utilizes one of these services the application may provide one or more of its functions to an API (application programming interface) for the service. When the framework detects completion, progress, or failure of the operation utilizing the service the framework will call one or more of the functions supplied to the API.
It would be useful to be able to monitor a framework that runs on only one thread and provide context for the requests within that thread.